const obj = {
  '0.and.c_log_module': {
    op: 'eq',
    value: 8,
    name: '字段名称',
    desc: '',
    types: ['str', 'num']
  },
  '0.and.e_application_app_protocol': {
    op: 'ranges',
    value: {
      lt: 6,
      lte: 6,
      gt: 1,
      gte: 1
    },
    name: '字段名称',
    desc: '字段描述',
    types: ['str', 'num']
  },
  '0.and.or.field1': {
    op: 'eq',
    value: 5,
    name: '字段名称',
    desc: '字段描述',
    types: ['str', 'num']
  },
  '0.and.or.field2': {
    op: 'in',
    value: 6,
    name: '字段名称',
    desc: '字段描述',
    types: ['str', 'num']
  },
  '0.and.and.field3': {
    op: 'neq',
    value: 5,
    name: '字段名称',
    desc: '字段描述',
    types: ['str', 'num']
  },
  '0.and.and.or.field3_1': {
    op: 'neq',
    value: 5,
    name: '字段名称',
    desc: '字段描述',
    types: ['str', 'num']
  },
  '0.and.and.or.field3_2': {
    op: 'neq',
    value: 8,
    name: '字段名称',
    desc: '字段描述',
    types: ['str', 'num']
  }
}

let result = {}
for (let key in obj) {
  let data = {
    [obj[key].op]: obj[key].value,
    "_": obj[key].name + ',' + obj[key].desc + ',' + obj[key].types.join(',')
  }
  const tmp = key.split('.').slice(1).reduceRight((total, item, index, arr) => {
    return (index === (arr.length - 1)) ? { [item]: data } : { [item]: total }
  }, {})
  console.log(tmp)
}